﻿@using NewRen.Models;
@using NewRen.Models.ViewModel;
@model NewRen.Models.User
@{
    UserGroup group = ViewBag.UserGroup;
    ViewBag.Title = "牛人管理-牛人添加";
    Layout = "~/Views/Shared/_Layout_UserGroup.cshtml";
}

<div class="ucenter-left account-left-border">
    <div class="ucneter-l-head cf">
        <div class="ulhead-headicon">
            @if (group.Picture == null)
            {
                <img src="/Images/userphoto.png" width="50" height="50"
                     alt=@group.GroupName style="border-radius:50%;" />
            }
            else
            {
                <img src="/UserGroup/ShowPicture/@group.ID" width="50"
                     alt=@group.GroupName height="50" style="border-radius:50%;" />
            }

        </div>
        <div class="ulhead-info">
            <p class="ulhead-info-uname">@group.GroupName</p>

            <div class="ulhead-info-tool">
                <a class="ulhead-icon icon-lock ucenter-mail " href="/UserGroup/PwdEdit/@group.ID" title="修改密码">
                    <div class="ucenter-mail-tip">修改密码</div>
                </a>
                <a href="/User/Edit/@group.ID"
                   class="ulhead-icon icon-setting ucenter-mail" title="修改牛棚信息"></a>
            </div>
        </div>
    </div>
    <div class="ucenter-l-list">
        <ul class="ullist-ul">
            <li id="uclick">
                <a href="/UserGroup/Show/@group.ID">牛棚中心</a>
            </li>
            <li id="uclick1">
                <a href="/UserGroup/Edit/@group.ID">牛棚设置</a>
            </li>
            <li id="uclick2" class="active">
                <a href="/UserGroup/UserManager/@group.ID">牛棚牛人</a>
            </li>
        </ul>
    </div>
</div>
<div class="ucenter-right cf">
    <div class="ucenter-right-head"></div>
    <div class="tabGroup">
        @using (Html.BeginForm("AddUser", "UserGroup", FormMethod.Post, new
        {
            onsubmit = "return UserAddCheck();"
        }))
        {
            @Html.AntiForgeryToken()
            @Html.HiddenFor(model => model.UserGroupID, new { @Value = @group.ID })
            <div class=" form-item">
                <div class="item-label">
                    <label>用户名：</label>
                </div>
                <div class="item-span">
                    @Html.TextBoxFor(model => model.UserName, new { @class = "txt sm" })
                </div>
            </div>
            <div class=" form-item">
                <div class="item-label">
                    <label>密码：</label>
                </div>
                <div class="item-span">
                    @Html.PasswordFor(model => model.Password, new { @class = "txt sm" })
                </div>
            </div>
            <div class=" form-item">
                <div class="item-label">
                    <label>手机：</label>
                </div>
                <div class="item-span">
                    @Html.TextBoxFor(model => model.Phone, new { @class = "txt sm" })
                </div>
            </div>
            <div class=" form-item">
                <div class="item-label">
                    <label>所属牛棚：</label>
                </div>
                <div class="item-span">
                    <span class="defInfo">@group.GroupName</span>
                </div>
            </div>
            <div class=" form-item">
                <div class="item-label">
                    <label></label>
                </div>
                <div class="item-span">
                    <input type="submit" value="保存" class="btn">
                    <span class="defInfo">@Html.ValidationSummary(true)</span>
                </div>
            </div>
        }
    </div>
</div>
